package com.example.miaosh.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.miaosh.base.mapper.BaseService;
import com.example.miaosh.entity.ItemStock;
import com.example.miaosh.mapper.ItemStockMapper;

/**
 * 仓库
 * 
 * @author kai
 *
 */
@Service
public class ItemStockService extends BaseService<ItemStock> {
	@Autowired
	private ItemStockMapper itemStockMapper;

	// 库存扣减
	public boolean decreaseStock(Integer itemId, Integer amount) {
		return itemStockMapper.decreaseStock(itemId, amount);
	}
}
